package com.downbox.repository;

import com.downbox.domain.UserMoodDaily;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.Optional;

/**
 * 用户每日情绪记录仓库接口
 */
@Repository
public interface UserMoodDailyRepository extends JpaRepository<UserMoodDaily, Long> {
    /**
     * 根据用户ID和日期查询用户当日情绪记录
     */
    Optional<UserMoodDaily> findByUidAndDate(Long uid, LocalDate date);
}